package cn.lm.activit.module;

import java.text.DecimalFormat;

/**
 * @author lm_jcf
 * @date 2019/4/3 18:17
 */
public class TestStatis extends ParentSta{

    public static void main(String[] args) {

//        new TestStatis();

//        System.out.println(TestStatis.class.getName());
//        new ParentSta();


        System.out.println(80%100);
        System.out.println(80/100);

        DecimalFormat format = new DecimalFormat("#.00");
        System.out.println(format.format(50.4154));
    }

    static class TestSt{
        static {
            System.out.println("inner class static method block");
        }
        {
            System.out.println("inner class method block");
        }
        TestSt(){
            System.out.println("inner class constructor");
        }
    }


    static {
        System.out.println("son static method block");
    }
    {
        System.out.println("son not static method block");
    }

    public TestStatis(){
        System.out.println("son constructor");
    }

    String sonVariable = "son variable";
    static String sonStaVariable = "son static variable";

}
class ParentSta{
    static String parentStaVariable = "parent static variable";
    String parentVariable = "parent variable";

    static {
        System.out.println("parent static method block");
    }
    {
        System.out.println(parentVariable);
        System.out.println(parentStaVariable);
        System.out.println("parent not static method block");
    }
    ParentSta(){
        System.out.println("parent constructor");
    }
}